<template>
  <el-dialog title="编辑销项明细" :visible.sync="dialogVisible" width="1000px" :close-on-click-modal="false"
    :modal-append-to-body="false" @close="dialogVisible=false" v-drag2anywhere>
    <el-form :model="formData" ref="formData" :rules="rules" label-width="80px">
      <el-row>
        <el-col >
            <el-form-item label="购方名称" prop="buyer">
             {{formData.buyer}}
            </el-form-item>
        </el-col>
        <el-col :span="8">
            <el-form-item label="开票日期">
              {{formData.date}}
            </el-form-item>
        </el-col>
        <el-col :span="8">
            <el-form-item label="发票号码" prop="num">
             {{formData.num}}
            </el-form-item>
        </el-col>
        <el-col :span="8">
            <el-form-item label="发票代码" prop="code">
             {{formData.code}}
            </el-form-item>
        </el-col>
        <el-col>
            <el-form-item label="税收分类">
              {{formData.num}}
            </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

<script>
  export default{
    data(){
      return{
        index:-1,
        formData:{
            num:'',
            code:'',
            buyer:'',
            taxname:'',
            taxcode:'',
            tickettype:'',
            title:'',
            model:'',
            unit:'',
            price:0,
            count:0,
            tax:0,
            total:0,
            sum:0
        },
        rules:{
          num:[{required:true,message:'请填写发票号码!',trigger:'blur'}]
        },
        dialogVisible:false,
        taxclassify:[],
      }
    },
    created(){
      this.loadTaxClasasify();
    },
    methods:{
        init(index,data){
          this.index=index;
          this.formData=data;
        },
        loadTaxClasasify() {
          this.axios.post("api/common/taxclassify/list").then(res => {
            if (res.status == 200 && res.data.code == 0) {
              this.taxclassify = res.data.list;
            }
          });
        },
    }
  }
</script>

<style>
</style>

